﻿using Raven;
using UnityEngine;

public abstract class UnityDisplayObject : DisplayObject
{
    protected GameObject _gameObject;
    public UnityDisplayObject(BaseGameEntity entity) : base(entity)
    {
    }

    public override void Start()
    {
        _gameObject = new GameObject();
        _gameObject.name = _owner.GetEntityType() + "-" + _owner.ID();
    }

    public override void Destroy()
    {
        GameObject.Destroy(_gameObject);
        _gameObject = null;
    }
}